package com.dz;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

import androidx.fragment.app.Fragment;

import java.util.UUID;

public class MainActivity extends SingleFragmentActivity {

    private static final String EXTRA_CRIME_ID = "main_crime_id";

    @Override
    protected CrimeFragment createFragment() {
        UUID crimeId = (UUID) getIntent().getSerializableExtra(EXTRA_CRIME_ID);
        Log.d("crimeId_2",crimeId+"");
        return CrimeFragment.newInstance(crimeId);
    }


    public static Intent newIntent(Context packageContent, UUID crimeId){
        Intent intent = new Intent(packageContent, MainActivity.class);
        intent.putExtra(EXTRA_CRIME_ID,crimeId);
        return intent;
    }

}